home *** CD-ROM | disk | FTP | other *** search
- /*$Id: COMBhvr.h 1.2 1996/07/30 01:04:27 Damien Exp $*/
-
- //
- // COM Example of a Behavior
- //
-
- #ifndef __COM_BHVR__
- #define __COM_BHVR__
-
- #ifndef __I3DEXTBH__
- #include "I3DExTbh.h"
- #endif
-
- // define the Behavior CLSID
-
- // {2F29F160-FCD3-11ce-A4F7-0000E202D5A5}
- DEFINE_GUID(CLSID_Behavior,0x2f29f160,0xfcd3,0x11ce,0xa4,0xf7,0x0,0x0,0xe2,0x2,0xd5,0xa5);
-
-
-
- typedef struct BehaviorData {
- char fNameObject1[256]; // name of the first object to align to
- char fNameObject2[256]; // name of the second object to align to
- NUM3D fRelPos; // relative position between the two objects (0 first, 1 second)
- } BehaviorData;
-
-
- // Behavior Object :
- #undef INTERFACE
- #define INTERFACE Behavior
- class Behavior : public I3DExTreeBehavior {
- public :
- Behavior();
- ~Behavior();
-
- // IUnknown Interface :
- STDMETHODIMP QueryInterface(THIS_ REFIID riid, LPVOID* ppvObj);
- STDMETHODIMP_(ULONG) AddRef(THIS);
- STDMETHODIMP_(ULONG) Release(THIS);
-
- // I3DExtension method :
- STDMETHODIMP_(I3DExtension*) Clone(THIS);
- STDMETHODIMP ShellUtilitiesInit(THIS_ IShUtilities* shellUtilities);
-
- // I3DExDataExchanger methods :
- STDMETHODIMP_(ExtensionDataMap*) GetExtensionDataMap(THIS);
- STDMETHODIMP_(void*) GetExtensionDataBuffer(THIS);
- STDMETHODIMP ExtensionDataChanged(THIS);
- STDMETHODIMP HandleEvent(THIS_ ULONG sourceID);
- STDMETHODIMP_(short) GetResID(THIS);
-
- // I3DExTreeBehavior methods
- STDMETHODIMP Apply (THIS_ I3DShTreeElement* tree);
- STDMETHODIMP SetGlobalTransform (THIS_ I3DShTreeElement *atree,const MATRIX3D *RR,const VECTOR3D *TT,short mode);
- private :
- ULONG fCRef; // reference Counter
- BehaviorData fData; // Behavior Data
- };
-
-
- #endif
-